package com.ruoyi.procured.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.api.walmartStockPlan.dto.PaymentReturnDto;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 审核流程表
 *
 * @author 刘广帆
 * @date 2024-10-18
 */
@Data
@TableName(value="tb_payment_request_process")
public class PaymentRequestProcess
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(value = "process_id")
    private String processId;

    /** 审核流程状态（0审核中，1同意，2拒绝）*/
    @TableField("process_status")
    private String processStatus;

    /** 审核时间 */
    @TableField("process_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date processTime;

    /** 审核流程备注 */
    @TableField("process_remark")
    private String processRemark;

    /** 申请付款ID */
    @TableField("payment_request_id")
    private String paymentRequestId;

    /** 审核人ID */
    @TableField("reviewer_id")
    private Long reviewerId;

    /** 审核人部门ID */
    @TableField("reviewer_dept_id")
    private Long reviewerDeptId;

    /** 审核人角色ID */
    @TableField("reviewer_role_id")
    private Long reviewerRoleId;

    /** 审核人顺序 */
    @TableField("reviewer_order")
    private Integer reviewerOrder;

    @TableField(exist = false)
    private String paymentType;//申请方式（0预付款，1应付款，2仅退款，3退货退款，4换货）

    @TableField(exist = false)
    private List<PaymentReturnDto> items;

    public PaymentRequestProcess(String processId, String processStatus, Date processTime, String paymentRequestId,
                                 Long reviewerId, Long reviewerDeptId, Long reviewerRoleId, Integer reviewerOrder) {
        this.processId = processId;
        this.processStatus = processStatus;
        this.processTime = processTime;
        this.paymentRequestId = paymentRequestId;
        this.reviewerId = reviewerId;
        this.reviewerDeptId = reviewerDeptId;
        this.reviewerRoleId = reviewerRoleId;
        this.reviewerOrder = reviewerOrder;
    }

    // **添加无参构造函数**
    public PaymentRequestProcess() {
    }
}
